//
//  AppTools.m
//  CarsHome
//
//  Created by dllo on 15/10/14.
//  Copyright (c) 2015年 changes. All rights reserved.
//

#import "AppTools.h"

@implementation AppTools

+(CGFloat)heightForCell:(NSString *)content
{
    CGSize size = CGSizeMake(300, 10000);
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont        systemFontOfSize:17],NSFontAttributeName, nil];
    CGRect rect = [content boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return rect.size.height;
}

+(CGFloat)widthForCell:(NSString *)content{
    CGSize size = CGSizeMake(300, 10000);
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont        systemFontOfSize:17],NSFontAttributeName, nil];
    CGRect rect = [content boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return rect.size.width;
}
@end
